<?php

use yii\db\Migration;

/**
 * Class m200621_065334_members
 */
class m200621_065334_members extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->execute(
            "CREATE TABLE {{%members}} (
                `memberId` int(11) NOT NULL AUTO_INCREMENT COMMENT '会员编号',
                `memberKey` varchar(200) DEFAULT NULL COMMENT '会员标识',
                `mobile` varchar(20) DEFAULT NULL COMMENT '会员名称',
                `passwordKey` varchar(20) DEFAULT NULL COMMENT '密码key',
                `passwordHash` varchar(200) DEFAULT NULL COMMENT '密码密文',
                `ctime` int(11) DEFAULT NULL COMMENT '注册时间',
                PRIMARY KEY (`memberId`)
            ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8"
        );
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropTable('{{%settings}}');
    }
}
